home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
NEW_TECH
/
RCSDOC.ZIP
/
RCSINTRO.TXT
< prev
next >
Wrap
Text File
|
1991-11-10
|
12KB
|
261 lines
RCSINTRO(1) Unix Programmer's Manual RCSINTRO(1)
NNNAAAMMMEEE
rcsintro - introduction to RCS commands
DDDEEESSSCCCRRRIIIPPPTTTIIIOOONNN
The Revision Control System (RCS) manages multiple revisions of files.
RCS automates the storing, retrieval, logging, identification, and
merging of revisions. RCS is useful for text that is revised frequently,
for example programs, documentation, graphics, papers, and form letters.
The basic user interface is extremely simple. The novice only needs to
learn two commands: ccciii(1) and cccooo(1). ccciii, short for check in, deposits
the contents of a file into an archival file called an RCS file. An RCS
file contains all revisions of a particular file. cccooo, short for check
out, retrieves revisions from an RCS file.
+o Store and retrieve multiple revisions of text. RCS saves all old
revisions in a space efficient way. Changes no longer destroy the
original, because the previous revisions remain accessible.
Revisions can be retrieved according to ranges of revision numbers,
symbolic names, dates, authors, and states.
+o Maintain a complete history of changes. RCS logs all changes
automatically. Besides the text of each revision, RCS stores the
author, the date and time of check-in, and a log message summarizing
the change. The logging makes it easy to find out what happened to
a module, without having to compare source listings or having to
track down colleagues.
+o Resolve access conflicts. When two or more programmers wish to
modify the same revision, RCS alerts the programmers and prevents
one modification from corrupting the other.
+o Maintain a tree of revisions. RCS can maintain separate lines of
development for each module. It stores a tree structure that
represents the ancestral relationships among revisions.
+o Merge revisions and resolve conflicts. Two separate lines of
development of a module can be coalesced by merging. If the
revisions to be merged affect the same sections of code, RCS alerts
the user about the overlapping changes.
+o Control releases and configurations. Revisions can be assigned
symbolic names and marked as released, stable, experimental, etc.
With these facilities, configurations of modules can be described
simply and directly.
+o Automatically identify each revision with name, revision number,
creation time, author, etc. The identification is like a stamp that
can be embedded at an appropriate place in the text of a revision.
The identification makes it simple to determine which revisions of
which modules make up a given configuration.
+o Minimize secondary storage. RCS needs little extra space for the
revisions (only the differences). If intermediate revisions are
deleted, the corresponding deltas are compressed accordingly.
Suppose you have a file fff...ccc that you wish to put under control of
\*(Dt 1
RCSINTRO(1) Unix Programmer's Manual RCSINTRO(1)
RCS. Invoke the check-in command
ccciii fff...ccc
This command creates the RCS file fff...ccc,,,vvv, stores fff...ccc into it as revision
1.1, and deletes fff...ccc. It also asks you for a description. The
description should be a synopsis of the contents of the file. All later
check-in commands will ask you for a log entry, which should summarize
the changes that you made.
Files ending in ,,,vvv are called RCS files (v stands for versions); the
others are called working files. To get back the working file fff...ccc in the
previous example, use the check-out command
cccooo fff...ccc
This command extracts the latest revision from fff...ccc,,,vvv and writes it into
fff...ccc. If you want to edit fff...ccc, you must lock it as you check it out with
the command
cccooo ---lll fff...ccc
You can now edit fff...ccc.
Suppose after some editing you want to know what changes that you have
made. The command
rrrcccsssdddiiiffffff fff...ccc
tells you the difference between the most recently checked-in version and
the working file. You can check the file back in by invoking
ccciii fff...ccc
This increments the revision number properly.
If ccciii complains with the message
ccciii eeerrrrrrooorrr::: nnnooo llloooccckkk ssseeettt bbbyyy _y_o_u_r _n_a_m_e
then you have tried to check in a file even though you did not lock it
when you checked it out. Of course, it is too late now to do the check-
out with locking, because another check-out would overwrite your
modifications. Instead, invoke
rrrcccsss ---lll fff...ccc
This command will lock the latest revision for you, unless somebody else
got ahead of you already. In this case, you'll have to negotiate with
that person.
Locking assures that you, and only you, can check in the next update, and
avoids nasty problems if several people work on the same file. Even if a
revision is locked, it can still be checked out for reading, compiling,
etc. All that locking prevents is a _c_h_e_c_k-_i_n by anybody but the locker.
\*(Dt 2
RCSINTRO(1) Unix Programmer's Manual RCSINTRO(1)
If your RCS file is private, i.e., if you are the only person who is
going to deposit revisions into it, strict locking is not needed and you
can turn it off. If strict locking is turned off, the owner of the RCS
file need not have a lock for check-in; all others still do. Turning
strict locking off and on is done with the commands
rrrcccsss ---UUU fff...ccc and rrrcccsss ---LLL fff...ccc
If you don't want to clutter your working directory with RCS files,
create a subdirectory called RRRCCCSSS in your working directory, and move all
your RCS files there. RCS commands will look first into that directory
to find needed files. All the commands discussed above will still work,
without any modification. (Actually, pairs of RCS and working files can
be specified in three ways: (a) both are given, (b) only the working
file is given, (c) only the RCS file is given. Both RCS and working
files may have arbitrary path prefixes; RCS commands pair them up
intelligently.)
To avoid the deletion of the working file during check-in (in case you
want to continue editing or compiling), invoke
ccciii ---lll fff...ccc or ccciii ---uuu fff...ccc
These commands check in fff...ccc as usual, but perform an implicit check-out.
The first form also locks the checked in revision, the second one
doesn't. Thus, these options save you one check-out operation. The
first form is useful if you want to continue editing, the second one if
you just want to read the file. Both update the identification